/**
 * Created by zhaocong on 2016/7/10.
 * 登录注册时的表单
 */
define(['jquery'],function (require, exports, module) {
  "use strict";

  function Login() {
    this._init();
  }

  Login.prototype.bindEvents = function () {
    $('#saoma').click(function () {
      $('.saoma').fadeIn().siblings('.admin-form').hide();
    });
    $('#shoudon').click(function () {
      $('.shoudon').fadeIn().siblings('.admin-form').hide();
    });
    $('#shFoot').click(function () {
      $(this).hide();
      $('.m-foot').fadeIn().siblings('footer').hide();
    });
  };

  /**
   * 初始化底部footer
   */
  Login.prototype.footer = function () {
    window.onload = function(){
      if(window.innerHeight > document.body.offsetHeight){
        $('footer').css('position','absolute');
      }
    };
  };

  /**
   * 默认方法
   * @private
   */
  Login.prototype._init = function () {

    this.bindEvents();
    this.footer();
    console.log('Loginjs is OK (づ￣3￣)づ');
  };

  module.exports = new Login();
});